.class final Lcom/peptalk/client/lbs/android/LbsManager$3;
.super Landroid/content/BroadcastReceiver;
.source "LbsManager.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/peptalk/client/lbs/android/LbsManager;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/peptalk/client/lbs/android/LbsManager;


# direct methods
.method constructor <init>(Lcom/peptalk/client/lbs/android/LbsManager;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/peptalk/client/lbs/android/LbsManager$3;->this$0:Lcom/peptalk/client/lbs/android/LbsManager;

    .line 212
    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 8
    .parameter "context1"
    .parameter "intent"

    .prologue
    .line 218
    iget-object v5, p0, Lcom/peptalk/client/lbs/android/LbsManager$3;->this$0:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-static {v5}, Lcom/peptalk/client/lbs/android/LbsManager;->access$9(Lcom/peptalk/client/lbs/android/LbsManager;)Landroid/net/wifi/WifiManager;

    move-result-object v5

    invoke-virtual {v5}, Landroid/net/wifi/WifiManager;->getScanResults()Ljava/util/List;

    move-result-object v5

    if-eqz v5, :cond_0

    .line 220
    new-instance v2, Ljava/util/ArrayList;

    iget-object v5, p0, Lcom/peptalk/client/lbs/android/LbsManager$3;->this$0:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-static {v5}, Lcom/peptalk/client/lbs/android/LbsManager;->access$9(Lcom/peptalk/client/lbs/android/LbsManager;)Landroid/net/wifi/WifiManager;

    move-result-object v5

    invoke-virtual {v5}, Landroid/net/wifi/WifiManager;->getScanResults()Ljava/util/List;

    move-result-object v5

    invoke-direct {v2, v5}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    .line 221
    .local v2, scanResults:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/net/wifi/ScanResult;>;"
    invoke-virtual {v2}, Ljava/util/ArrayList;->clone()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/util/ArrayList;

    .line 222
    .local v3, scanResultsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/net/wifi/ScanResult;>;"
    invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .line 223
    .local v1, scanResultIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/net/wifi/ScanResult;>;"
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-nez v5, :cond_2

    .line 232
    .end local v1           #scanResultIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/net/wifi/ScanResult;>;"
    .end local v2           #scanResults:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/net/wifi/ScanResult;>;"
    .end local v3           #scanResultsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/net/wifi/ScanResult;>;"
    :cond_0
    iget-object v5, p0, Lcom/peptalk/client/lbs/android/LbsManager$3;->this$0:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-static {v5}, Lcom/peptalk/client/lbs/android/LbsManager;->access$6(Lcom/peptalk/client/lbs/android/LbsManager;)Ljava/lang/String;

    move-result-object v5

    monitor-enter v5

    .line 233
    :try_start_0
    iget-object v6, p0, Lcom/peptalk/client/lbs/android/LbsManager$3;->this$0:Lcom/peptalk/client/lbs/android/LbsManager;

    const/4 v7, 0x1

    invoke-static {v6, v7}, Lcom/peptalk/client/lbs/android/LbsManager;->access$11(Lcom/peptalk/client/lbs/android/LbsManager;Z)V

    .line 234
    iget-object v6, p0, Lcom/peptalk/client/lbs/android/LbsManager$3;->this$0:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-static {v6}, Lcom/peptalk/client/lbs/android/LbsManager;->access$12(Lcom/peptalk/client/lbs/android/LbsManager;)Z

    move-result v6

    if-eqz v6, :cond_1

    .line 235
    iget-object v6, p0, Lcom/peptalk/client/lbs/android/LbsManager$3;->this$0:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-static {v6}, Lcom/peptalk/client/lbs/android/LbsManager;->access$6(Lcom/peptalk/client/lbs/android/LbsManager;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/Object;->notifyAll()V

    .line 232
    :cond_1
    monitor-exit v5
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 238
    return-void

    .line 224
    .restart local v1       #scanResultIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/net/wifi/ScanResult;>;"
    .restart local v2       #scanResults:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/net/wifi/ScanResult;>;"
    .restart local v3       #scanResultsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/net/wifi/ScanResult;>;"
    :cond_2
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/ScanResult;

    .line 225
    .local v0, scanResult:Landroid/net/wifi/ScanResult;
    new-instance v4, Lcom/peptalk/client/lbs/android/Wifi;

    invoke-direct {v4}, Lcom/peptalk/client/lbs/android/Wifi;-><init>()V

    .line 226
    .local v4, wifiNext:Lcom/peptalk/client/lbs/android/Wifi;
    iget-object v5, v0, Landroid/net/wifi/ScanResult;->BSSID:Ljava/lang/String;

    iput-object v5, v4, Lcom/peptalk/client/lbs/android/Wifi;->mac:Ljava/lang/String;

    .line 227
    iget-object v5, v0, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    iput-object v5, v4, Lcom/peptalk/client/lbs/android/Wifi;->ssid:Ljava/lang/String;

    .line 228
    iget v5, v0, Landroid/net/wifi/ScanResult;->level:I

    iput v5, v4, Lcom/peptalk/client/lbs/android/Wifi;->rssi:I

    .line 229
    iget-object v5, p0, Lcom/peptalk/client/lbs/android/LbsManager$3;->this$0:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-static {v5}, Lcom/peptalk/client/lbs/android/LbsManager;->access$10(Lcom/peptalk/client/lbs/android/LbsManager;)Ljava/util/ArrayList;

    move-result-object v5

    invoke-virtual {v5, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 232
    .end local v0           #scanResult:Landroid/net/wifi/ScanResult;
    .end local v1           #scanResultIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/net/wifi/ScanResult;>;"
    .end local v2           #scanResults:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/net/wifi/ScanResult;>;"
    .end local v3           #scanResultsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/net/wifi/ScanResult;>;"
    .end local v4           #wifiNext:Lcom/peptalk/client/lbs/android/Wifi;
    :catchall_0
    move-exception v6

    :try_start_1
    monitor-exit v5
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v6
.end method
